package c8;

public class GradeExam {
    public static void test(char[][] answers, char[] keys) {
        for (int i = 0; i < answers.length; i++) {
            // Grade one student
            int correctCount = 0;
            for (int j = 0; j < answers[i].length; j++) {
                if (answers[i][j] == keys[j])
                    correctCount++;
            }

            System.out.println("Student " + i + "'s correct count is " + correctCount);
        }
    }
}
